define(['durandal/app','plugins/dialog'],function (app,dialog) {
	var settings = {
		'buttonClass':'btn',
		'primaryButtonClass ':'btn-primary',
		'secondaryButtonClass ':null,
		'class':'messageBox',
		'style':{}//like { width: "600px", backgroundColor: "red" }
	}
//	dialog.MessageBox.setDefaults({ 
//		buttonClass: "iconbutton", 
//		primaryButtonClass: "float-right", 
//		secondaryButtonClass: "cancelbutton float-left" 
//	});

//	app.showMessage = function(message, title, options, autoclose, settings){
//		debugger;
//		return dialog.showMessage(message, title, options, autoclose, settings);
//	}

//app.showMessage('This is a message.').then(function(dialogResult){
////do something with the dialog result here
//});

	return {
		onBtn1Click:function () {
//			app.showMessage('from btn 1:Hi');
//			app.showMessage('from btn 1:Hi','tips');
//			app.showMessage('are you ok?','tips',['yes','no','a little']);
			app.showMessage('are you ok?','tips',[{ text: "是", value: "Yes" },{ text: "否", value: "No" }]);
		},
		onBtn2Click:function () {
			dialog.showMessage('开启了autoclose，点击背景可以关闭modal','tips',[{ text: "是", value: "Yes" },{ text: "否", value: "No"}],true);
		}
	};
})